<?php

/* 
 * Copyright (c) 2012 Aalto University and University of Helsinki
 * MIT License
 * see LICENSE.txt for more information
 */

// include and register Twig auto-loader
include '../twig/lib/Twig/Autoloader.php';
Twig_Autoloader::register();

try {
  // specify where to look for templates
  $loader = new Twig_Loader_Filesystem('../templates');

  // initialize Twig environment
  $twig = new Twig_Environment($loader, array('auto_reload' => true));

  // load template
  $template = $twig->loadTemplate('test.html');

  // set template variables
  // render template
  echo $template->render(array(
	'title' => 'onki-light',
	'ontology_name' => 'YSO'
  ));

} catch (Exception $e) {
  die ('ERROR: ' . $e->getMessage());
}
?>